home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / login / error.c < prev    next >
C/C++ Source or Header  |  1996-07-21  |  577b  |  26 lines

  1.  
  2. #include "cblogin.h"
  3.  
  4. void error (char *fmt, ...)
  5. {
  6.     va_list
  7.         args;
  8.         
  9.     va_start (args, fmt);        /* get the arguments */
  10.                     /* display message to user */
  11.     if (!get_emailaddress())
  12.     puts("The callback wasn't established.\n"
  13.         "Please repair the following problem:");
  14.     else
  15.     printf("The callback wasn't established.\n"
  16.         "Please inform %s about the following problem:\n"
  17.         , get_emailaddress());
  18.  
  19.     vprintf(fmt, args);            /* print the message itself */
  20.     putchar('\n');            /* and nl */
  21.  
  22.     logv(fmt, args);            /* log the error */
  23.     exit (1);
  24. }
  25.     
  26.